package practice;

public class Pra_02 {
    public void pra1() {
        int sum = 0;
        for(int i = 2; i <= 100; i += 2)
            sum += i;
        System.out.println(sum);
    }
    public void pra2() {
        int result = 1;
        for(int i = 2; i <= 8; i++)
            result *= i;
        System.out.println(result);
    }
    public void pra3() {
        int rowNum = 15;
        for(int row = 1; row <= rowNum; row++) {
            for(int i = 0; i < rowNum - row; i++)
                System.out.print(" ");
            for(int column = 1; column <= 2 * row - 1; column++)
                System.out.print("*");
            System.out.println();
        }
    }

    public static void main(String[] args) {
        Pra_02 pra = new Pra_02();
        pra.pra1();
        System.out.println("--------------");
        pra.pra2();
        System.out.println("------------------------------------------");
        pra.pra3();
        System.out.println("------------------------------------------");
    }
}
